TransactionExecuting
Execute Transaction
Request address
POST
http://OmsAddress/app/newoms.php/webservice/oamp/transaction/executing?cmd=10002&ip-type=webservicerest&access-token=AccessTokenVal
POST request parameter description
Parameter name | Data type | Description | Whether the field is required | Remarks |
---|---|---|---|---|
trans_id | integer | Transaction id the table to be added | Yes | |
set_id | integer | set id of the transaction | Yes |
Data Parameters
Use json format to represent the record related information. The following is an example:
{
"trans_id": 404,
"set_id": 126
}
Return Syntax
Return Parameter Description
- When the returned status code is not 200, it indicates that the transaction failed to execute, and the returned data is the message about the transaction failed to execute
- When the returned status code is 200, it indicates that the transaction is started to execute, and the returned data format is as follows:
Field name | Data type | Description | Remarks |
---|---|---|---|
trans_id | integer | id of the corresponding transaction executed | |
set_id | integer | Set of the transaction |
Note: You can query whether the transaction has been completed in combination with "3.11. Query Transaction Details". The status = 9 of the transaction indicates that the transaction has been successfully executed and completed. When the table-adding transaction has been successfully completed, it indicates that the table has been added successfully.
Request Example
Send A Request through the Curl Method
For the parameters in the command, please refer to the "Description of POST Request Parameters" on this page. For the method to obtain access-token, see: Get access-token
curl -H "Content-type: application/json" -X "POST" -d '{ "trans_id": 404, "set_id": 126 }' http://omsaddress/app/newoms.php/webservice/oamp/transaction/executing?cmd=10002&ip-type=webservicerest&access-token=\
Return Example
Successful Return Example
Status of http request = 200
{
"set_id": 126,
"trans_id": 404
}
Failed Return Example
Status of http request != 200
{
"trans_id": [
"Transaction does not exist, cluster ID: 125, transaction ID: 404"
]
}
{
"trans_id": [
"The current transaction status does not allow to execute, and current transaction status: successfully completed"
]
}